<?php $user_role = $this->session->userdata('admin_role'); ?>

<div id="content">
    <div id="title_content">Danh sách liên hệ</div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
            <?php echo $this->session->flashdata('error'); ?>
        </div>
    <?php endif; ?>

    <table class="list" width="100%">
        <thead>
            <tr>

                <th>Tên công ty </th>
                <th>Email</th>
                <th>Điện thoại</th>

                <?php if ($this->session->userdata('admin_role') == '1'): ?>
                    <th colspan="2">Action</th>
                <?php endif; ?>
            </tr>
        </thead>
        <tbody>
            <?php
            if (isset($khachhang_data) && !empty($khachhang_data)):
                foreach ($khachhang_data as $aRow):
                    ?>
                    <tr>
                        <td><?php echo $aRow['ten_cong_ty']; ?></td>
                        <td><?php echo $aRow['email']; ?></td>
                        <td><?php echo $aRow['dien_thoai']; ?></td>
                        <?php if ($this->session->userdata('admin_role') == '1'): ?>
                            <td width="30px"><a href="<?php echo site_url('lien_he/sua_thong_tin/' . $aRow['id']) ?>" title="Sửa"><img src="<?php echo base_url() ?>assets/admin/images/modifier.png" alt="modifier"/></a></td>
                            <td width="30px"><a class="confirm_delete" href="<?php echo site_url('lien_he/xoa_thong_tin/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>
                                <?php endif; ?>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </tbody>
    </table>
    <?php echo $pagination; ?>



</div>
<!--END content-->
